﻿<%@ Page Language="C#" MasterPageFile="~/Demo.master" Inherits="DemoPage" Title="Server Dialog" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>

<script runat="server">
    public void Server_OpenDialog(object sender, EventArgs e)
    {
        DemoDialog.AutoOpen = true;
    }
    
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all">
        Sometimes we need to show a Dialog after PostBack. Set the <b>AutoOpen</b> property
        to "true", When the page loaded a Dialog will show automatic.
    </div>
    <br />
    <DotNetAge:SimpleButton ID="SimpleButton1" runat="server" Text="Open Dialog" OnClick="Server_OpenDialog" />
    <br />
    <DotNetAge:Dialog ID="DemoDialog" runat="server" Draggable="true" Resizable="false"
        Title="Server Dialog">
        <Buttons>
            <DotNetAge:DialogButton Text="OK" OnClientClick="$(this).dialog('close')" />
        </Buttons>
        <BodyTemplate>
            <div style="padding:30px;">
               This is a Dialog shows via Server.
            </div>
        </BodyTemplate>
    </DotNetAge:Dialog>
  
    <br />
    <br />
    <demo:Code runat="server" ID="codeView" SourceFile="~/Dialog/Codes/ServerDialog.aspx" />
</asp:Content>
